package me.zhengjie.modules.biz.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.biz.service.TextService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 文本模块
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "专业：单招指导（字典）管理")
@RequestMapping("/api/text")
public class TextController {

    private final TextService textService;

    @GetMapping("/remind/{category}")
    @Log("文案查询")
    @ApiOperation("文案查询")
    public ResponseEntity<Object> remind(@ApiParam(value = "文案类别：1-高考提示，2-统招，单招智能荐校文案，3-专升本智能荐校文案，4-统招VIP提示文案，5-专升本VIP提示文案，6-单招VIP提示文案", example = "1")
                                         @PathVariable("category") Integer category) {
        return new ResponseEntity<>(textService.remind(category), HttpStatus.OK);
    }
}
